<table class="table">
    <tr>
        <td>品牌</td>
        <td>活动详情</td>
        <td>活动时间</td>
        <td>状态</td>
    </tr>
    <foreach item="brand" name="brands">
        <if condition="$brand['activity']">
            <tr>
                <td>{$brand.name|msubstr=0,7}</td>
                <td>{$brand.activity.title|msubstr=0,7}</td>
                <td style="color: {$brand.activity.color};">
                    {$brand.activity.start_time|date="m/d",###}-{$brand.activity.end_time|date="m/d",###}
                </td>
                <td
                <if condition="$brand['activity']['status'] eq 4">style="color: red;"
                    <elseif condition="$brand['activity']['status'] eq 100"/>
                    style="color: green;"
                </if>
                >
                {$brand.activity.status_info}
                <if condition="$brand['activity']['status'] eq 100">
                    <a href="javascript:;" class="task_add" data-mid="{$brand.mid}" data-fid="{$fid}"
                       data-bid="{$brand.id}">
                        <i class="icon-plus"></i>
                    </a>
                </if>
                <if condition="($brand['activity']['status'] eq 1) OR ($brand['activity']['status'] eq 4) ">
                    <a href="javascript:;" class="task_update" data-tid="{$brand.activity.id}">
                        <i class="icon-edit"></i>
                    </a>
                </if>
                <if condition="$brand['activity']['status'] eq 100">
                    <a class="activity_extension" href="javascript:;" data-tid="{$brand.activity.id}">
                        <i class="icon-chevron-right"></i>
                    </a>
                </if>
                </td>
            </tr>
            <else/>
            <tr>
                <td>{$brand.name}</td>
                <td>无</td>
                <td>无</td>
                <td>
                    <a href="javascript:;" class="task_add" data-mid="{$brand.mid}" data-fid="{$fid}"
                       data-bid="{$brand.id}">
                        <i class="icon-plus"></i>
                    </a>
                </td>

            </tr>
        </if>
    </foreach>
</table>
<script type="text/javascript">
    $(function () {
        $("a.activity_extension").activityExt();
        $("a.task_add").editorAddTask();
        $("a.task_update").editorUpdateTask();

    });
</script>